{% extends "base.html" %}
{% block stylesheet %}result.css{% endblock %}

{% block title%}Metabus - Interlegis {% endblock %}

{% block content%}
<div id="sumary">
    <p> Resultados <b>1</b> - <b>10</b> de <b>{{result_count}}</b> (<b>{{source_count}}</b> fontes) para <b>{{search_keywords}}</b>  (<b>{{ wait_time|floatformat:2}}</b> segundos) </p>
</div>
<div class="result">
    <ol>
    {% for result in results|dictsort:"order" %}
        <li>
            <h3 class="title"><a href="{{result.link}}">{{result.title}}</a></h3>
            <div>
                <p>{{result.description|striptags|truncatewords:50|urlize }}</p>
                <cite>{{result.link}}</cite>
            </div>
        </li>
    {% endfor %}
    </ol>
</div>

{% if not_returned_sources %}
    <div id="notreturnedsources">
        <h2>Buscas não finalizadas:</h2>
        <ul>
        {% for source in not_returned_sources %}
            <li>{{source.name}}</li>
        {% endfor %}
        </ul>
        <a href="{% url search %}?{{query_string}}">Atualizar</a>
    </div>
{% endif %}
{% endblock %}
